﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Mvc4Demo.Extensions;
using Mvc4Demo.Models;
using MvcExtensions.Extensions;

namespace Mvc4Demo.Controllers
{
    public class TestController : Controller
    {
        //
        // GET: /Test/

        public ActionResult Index()
        {
            var model = new TestViewModel
            {
                PersonType = "2",
                Salaries = new List<SalaryViewModel>
                {
                    new SalaryViewModel(){ Amount = 1000, Date = DateTime.Now.AddDays(-90)},
                    new SalaryViewModel(){ Amount = 1000, Date = DateTime.Now.AddDays(-60)},
                    new SalaryViewModel(){ Amount = 1000, Date = DateTime.Now.AddDays(-30)},
                    new SalaryViewModel(){ Amount = 1000, Date = DateTime.Now},
                }
            };

            DataExtensions.UpdateLookupText(model);

            return View(model);
        }

        public ActionResult WpfBinding()
        {
            return View();
        }
    }
}
